package com.cc.demo.entity;

import com.cc.demo.utils.UuidGenerator;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "ORDERS")
@Data
public class Order extends VersionedEntityWithID implements Serializable {

    private static final long serialVersionUID = 2171551919351095952L;
    @Column(name = "ORDER_ID", length = 50)
    private final String orderId = UuidGenerator.newUuid();
}
